package com.itetchologyandenglish.home.aop;

public class Test {
//        public static void main(String[] args) throws Exception {
//            Class p=Syslog.class;
//            Field declaredField = p.getDeclaredField("name");
//            declaredField.setAccessible(true);
//            if(declaredField.isAnnotationPresent(AnnotationTest.class)) {
//                AnnotationTest annotation = declaredField.getAnnotation(AnnotationTest.class);
//
//
//                //System.out.println(annotation.age()+":"+annotation.name());
//                String name = annotation.name();
//                Person p1=new Person();
//                declaredField.set(p1, name);//为declaredfield属性赋name值,其中name必须是p1中的属性。所以需要p1对象
//                System.out.println(declaredField.get(p1));
//
//
//            }
//        }
//
//

}
